PSA Object Model Diagrams

TeamScheduleTemplateService

global with sharing class TeamScheduleTemplateService

this class contains a team schedule template api implementation, including sub-classes for team schedule template creation requests. There are sub-classes for team schedule template creation requests.

Methods

createTeamScheduleTemplate

global Set<Id> createTeamScheduleTemplate(Id teamId, List<TeamScheduleTemplateService.CreateTeamScheduleTemplateRequest> createTeamScheduleTemplateRequest)

This method creates a team schedule template using details provided from the CreateTeamScheduleTemplateRequest list.
Operations are performed as follows:
• Inserts new team schedule templates.
• Inserts new team schedule template time slots.

Input Parameters

Name Type Description
teamId Id The team id of the team schedule template.
createTeamScheduleTemplateRequest List<TeamScheduleTemplateService.CreateTeamScheduleTemplateRequest> A list of CreateTeamScheduleTemplateRequest objects.

Exceptions Thrown

Value Description
TeamScheduleTemplateDetailException This exception occurs when user a sends a request with zero time slots or invalid time slot data.

Return Value

This service returns the ids of the newly created team schedule templates.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

You need to provide some sample code

TeamScheduleTemplateService.TeamScheduleTemplateRequest

global abstract class TeamScheduleTemplateRequest

the request structure for the teamscheduletemplaterequest class.

Properties

Name Type Description
TeamId Id the team id associated with the team schedule template.
TemplateName String the template name.

TeamScheduleTemplateService.CreateTeamScheduleTemplateRequest

global class CreateTeamScheduleTemplateRequest extends TeamScheduleTemplateRequest

the request structure for creating a team schedule template.

This class extends TeamScheduleTemplateService.TeamScheduleTemplateRequest

Properties

Name Type Description
Slots List<TeamScheduleTemplateService.TeamScheduleTemplateSlotDetail> The list of TeamScheduleTemplateSlotDetail objects used to create schedule template slots for team schedule.

Methods

CreateTeamScheduleTemplateRequest

global CreateTeamScheduleTemplateRequest(Id teamId, String templateName, List<TeamScheduleTemplateService.TeamScheduleTemplateSlotDetail> slots)

A default constructor CreateTeamScheduleTemplateRequest class with the minimum required properties.

Input Parameters

Name Type Description
teamId Id The team id.
templateName String The template name.
slots List<TeamScheduleTemplateService.TeamScheduleTemplateSlotDetail> The list of TeamScheduleTemplateSlotDetail objects used to create time slots of a team schedule template.

TeamScheduleTemplateService.TeamScheduleTemplateSlotDetail

global class TeamScheduleTemplateSlotDetail

The structure for the Custom Exception class, used to throw errors.

Properties

Name Type Description
SlotName string The name of the schedule template time slot.
StartTime string The start time of the schedule template time slot.
EndTime string The end time of the schedule template time slot.
Hours decimal The total hours of the schedule template time slot.
Capacity Integer The number of resources required for the schedule template time slot.
SlotType Id The id of schedule slot type for the schedule template time slot.

Methods

TeamScheduleTemplateSlotDetail

global TeamScheduleTemplateSlotDetail(string slotName, string startTime, string endTime, decimal hours, Integer capacity, Id slotTypeId)

A default constructor with the minimum required properties.

Input Parameters

Name Type Description
slotName string The name of schedule template time slot.
startTime string The start time of schedule template time slot.
endTime string The end time of schedule template time slot.
hours decimal The total hours of schedule template time slot.
capacity Integer The number of resources required for schedule template time slot.
slotTypeId Id The id of the schedule slot type for the schedule template time slot.
© Copyright 2009–2021 FinancialForce.com, inc. Confidential – all rights reserved. Various trademarks held by their respective owners.